From: Juri Linkov Date: Sun, 29 Nov 2009 23:52:16 +0000 (+0000) Subject: (ediff-minibuffer-with-setup-hook): New compatibility macro. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~9183 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0504f250833f6ea37c2ef04da67893c72528b27f;p=emacs.git (ediff-minibuffer-with-setup-hook): New compatibility macro. (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 234d50442d4..cace9edd751 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-11-29 Juri Linkov + + * ediff-util.el (ediff-minibuffer-with-setup-hook): + New compatibility macro. + (ediff-read-file-name): Use it instead of + `minibuffer-with-setup-hook'. + 2009-11-29 Juri Linkov Add defcustom to define the cycling order of `recenter-top-bottom'. diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index e8a171bf517..4dfd6f60518 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -3091,6 +3091,12 @@ Hit \\[ediff-recenter] to reset the windows afterward." ) +;; for compatibility +(defmacro ediff-minibuffer-with-setup-hook (fun &rest body) + `(if (fboundp 'minibuffer-with-setup-hook) + (minibuffer-with-setup-hook ,fun ,@body) + ,@body)) + ;; This is adapted from a similar function in `emerge.el'. ;; PROMPT should not have a trailing ': ', so that it can be modified ;; according to context. @@ -3118,7 +3124,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (and default-file (list default-file)) default-dir))) f) - (setq f (minibuffer-with-setup-hook + (setq f (ediff-minibuffer-with-setup-hook (lambda () (when defaults (setq minibuffer-default defaults))) (read-file-name